package cn.wolfcode.luowowo.search.serevice.impl;

import cn.wolfcode.luowowo.search.repository.ITravelSearchRepository;
import cn.wolfcode.luowowo.search.repository.IUserInfoSearchRepository;
import cn.wolfcode.luowowo.search.service.ITravelTemplateService;
import cn.wolfcode.luowowo.search.service.IUserInfoTemplateService;
import cn.wolfcode.luowowo.search.template.TravelTemplate;
import cn.wolfcode.luowowo.search.template.UserInfoTemplate;
import com.alibaba.dubbo.config.annotation.Service;
import org.elasticsearch.client.ElasticsearchClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;

import java.util.List;

@Service
public class TravelTemplateServiceImpl implements ITravelTemplateService {
    @Autowired
    private ElasticsearchTemplate template;

    @Autowired
    private ITravelSearchRepository repository;

    @Autowired
    private ElasticsearchClient client;

    @Override
    public void save(TravelTemplate t) {
        repository.save(t);
    }

    @Override
    public List<TravelTemplate> findByDestId(Long id) {
        return repository.findByDestId(id);
    }


}
